import request from "@/libs/request";

/**
 * 查询部门树
 * @returns {*}
 */
export function getDeptTree(){
  return request({
    url:'/sys/dept/getDeptTree',
    method:'get'
  })
}
export function searchDept(params){
  return request({
    url:'/sys/dept/searchDept',
    method:'get',
    params
  })
}
export function saveDept(data){
  return request({
    url:'/sys/dept',
    method:'post',
    data
  })
}
export function updateDept(data){
  return request({
    url:'/sys/dept',
    method:'put',
    data
  })
}
export function deleteDept(deptId){
  return request({
    url:`/sys/dept/${deptId}`,
    method:'delete'
  })
}
export function batchDelete(ids){
  return request({
     url:'/sys/dept/batchDelete',
     method:'delete',
     params:{ids:ids}
  })
}
